.fx-checkbox {
  user-select: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: $font-color-default;
  transition: all 0.15s ease-in;
  margin-right: 10px;

  &.active {
    color: $checkbox-active-background;

    > .fx-checkbox-select-box {
      background-color: $checkbox-active-background;
      border-color: $checkbox-active-background;
      color: $checkbox-background;

      > i.icon {
        transform: scale(1);
      }
    }
  }

  &.disabled {
    color: $font-color-lowest;
    cursor: not-allowed;

    &.active {
      > .fx-checkbox-select-box {
        color: $font-color-lowest !important;
      }
    }

    > .fx-checkbox-select-box {
      background-color: $checkbox-disabled-background;
      border-color: $border-color-secondary;
    }
  }

  > .fx-checkbox-select-box {
    background-color: $checkbox-background;
    color: $checkbox-background;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border: 1px solid $border-color-default;
    border-radius: $border-radius;
    box-sizing: border-box;
    width: 14px;
    height: 14px;
    line-height: 14px;
    transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);

    > .indeterminate {
      display: inline-block;
      width: 50%;
      height: 50%;
      background-color: $checkbox-active-background;
      transform-origin: center center;
      transform: scale(0);
      transition: transform .15s ease-in .05s;

      &.active {
        transform: scale(1);
      }
    }

    > i.icon {
      display: inline-block;
      transform-origin: left center;
      transform: scale(0);
      transition: transform .15s ease-in .05s;
    }
  }

  > .fx-checkbox-label {
    padding-left: 5px;
  }
}

.fx-checkbox-button {
  user-select: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: $font-color-default;
  transition: all 0.15s ease-in;
  border-right: 1px solid $border-color-default;
  background-color: $checkbox-background;

  &:last-of-type {
    border-right: none;
  }

  &:hover {
    color: $checkbox-active-background;
  }

  &.active {
    background-color: $checkbox-active-background;
    color: $checkbox-background;
  }

  &.disabled {
    cursor: not-allowed;
    color: $checkbox-disabled;

    &.active {
      background-color: $font-color-lowest;
      color: $checkbox-background;
    }
  }

  &.large {
    height: $height-large;
    line-height: $height-large;
    padding: 0 20px;
  }

  &.middle {
    height: $height-middle;
    line-height: $height-middle;
    padding: 0 20px;
  }

  &.default {
    height: $height-default;
    line-height: $height-default;
    padding: 0 15px;
  }

  &.mini {
    height: $height-mini;
    line-height: $height-mini;
    padding: 0 15px;
  }
}

.fx-checkbox-group {
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;

  &.button-group {
    border: 1px solid $border-color-default;
    border-radius: $border-radius-default;
    overflow: hidden;
  }
}
